<template>
    <div class="orderForm">
      <el-table v-loading="pageLoading" :data="pageVO.list" border fit highlight-current-row style="width: 100%">
        <el-table-column
          prop="number"
          label="吧台编号"
          width="180">
        </el-table-column>
        <el-table-column
          prop="region"
          label="投放区域"
          width="180">
        </el-table-column>
        <el-table-column
          prop="allocationRatio"
          label="分润比例">
        </el-table-column>
        <el-table-column
          prop="totalIncome"
          label="总收益">
          <template slot-scope="{ row }">
            <span>{{row.totalIncome > 0 ? row.totalIncome : 0}}</span>
          </template>
        </el-table-column>
        <el-table-column
          prop="createTime"
          label="创建时间">
        </el-table-column>
      </el-table>
      <!-- 分页条 -->
      <pagination
        v-show="pageVO.total > 0"
        :total="pageVO.total"
        :page.sync="pageQuery.pageNum"
        :limit.sync="pageQuery.pageSize"
        @pagination="getPage()"
      />
    </div>
  </template>
  
  <script>
  import * as api from "@/api/investor/index";
  import Pagination from "@/components/Pagination";
  export default {
    components: { Pagination },
    data() {
      return {
        pageLoading: false,
        pageQuery: {
          pageSize: 10,
          pageNum: 1,
          investorId:null,
        },
        // 返回参数
        pageVO: {
          list: [], // 返回的列表
          total: 0, // 一共多少条数据
          pages: 0, // 一共多少页
        },
      }
    },
    mounted() {
    this.pageQuery.investorId=this.$route.query.barCounterInvestorId

    this.apiButa()
  },
    methods:{
      apiButa(){
        this.pageLoading = true
        api.batsaves(this.pageQuery).then(pageVO=>{
          this.pageVO = pageVO;
          this.pageLoading = false;
        })
      }
    }
  }
</script>
  
<style lang="scss" scoped>
::v-deep .red-header .el-table__header th {
 background-color: rgb(242, 243, 245);
 color: #000; /* 可选：为了确保文字颜色与背景对比度良好，可以设置文本颜色为白色 */
}
</style>